Re: [SQL] case-insensitive SORT BY? - Mailing list pgsql-sql

From lynch@lscorp.com (Richard Lynch)
Subject Re: [SQL] case-insensitive SORT BY?
Date
Msg-id v02140b5fb22d7ff8816a@[207.152.64.133]
Whole thread Raw
Responses Re: [SQL] case-insensitive SORT BY?  (Chris Johnson <cmj@inline-design.com>)
List pgsql-sql
Cheat.  Get the name back, *AND* a second "field" with the name in upper
case, and then sort by that upper-cased name.  EG:

"select name, upper(name) as key where name like '%clinton%' sort by key"

At 3:53 PM 9/22/98, Patrick Giagnocavo wrote:
>I am trying to ensure that when I do a SORT BY I get back the results in
>normal sorted order instead of case-sensitive order.  The WHERE clause
>contains a LIKE '%..%' so I cannot use UPPER here in a way that does
>what I want.
>
>e.g. , given
>
>A, B, b, a
>
>as data, the normal SORT BY behavior returns
>
>a
>b
>A
>B
>
>How do I make it return
>
>a
>A
>b
>B
>
>instead?

--
--
-- "TANSTAAFL" Rich lynch@lscorp.com



pgsql-sql by date:

Previous
From: Eric McKeown
Date:
Subject: RE: [SQL] To create the query for a select where one is NOT in th e other
Next
From: "Jackson, DeJuan"
Date:
Subject: RE: [SQL] To create the query for a select where one is NOT in th e other